Skip to content

Wire Telemetry.MetricCardinalityLimit to Beholder#23084

Open
pkcll wants to merge 5 commits into
developfrom
beholder-otel-limit-metric-cardinality
Open

Wire Telemetry.MetricCardinalityLimit to Beholder#23084
pkcll wants to merge 5 commits into
developfrom
beholder-otel-limit-metric-cardinality

Conversation

@pkcll

@pkcll pkcll commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add MetricCardinalityLimit to [Telemetry] in core.toml (default 100,000, 0 disables).
  • Wire through telemetryConfignewBeholderClientbeholder.Config.MetricCardinalityLimit.
  • Forward to LOOP plugins via TelemetryMetricCardinalityLimit in LoopRegistry.

Companion to chainlink-common#2225.

Test plan

  • go test ./core/services/chainlink/... ./plugins/...

@github-actions

Copy link
Copy Markdown
Contributor

I see you updated files related to core. Please run make gocs in the root directory to add a changeset as well as in the text include at least one of the following tags:

  • #added For any new functionality added.
  • #breaking_change For any functionality that requires manual action for the node to boot.
  • #bugfix For bug fixes.
  • #changed For any change to the existing functionality.
  • #db_update For any feature that introduces updates to database schema.
  • #deprecation_notice For any upcoming deprecation functionality.
  • #internal For changesets that need to be excluded from the final changelog.
  • #nops For any feature that is NOP facing and needs to be in the official Release Notes for the release.
  • #removed For any functionality/config that is removed.
  • #updated For any functionality that is updated.
  • #wip For any change that is not ready yet and external communication about it should be held off till it is feature complete.

@github-actions

Copy link
Copy Markdown
Contributor

✅ No conflicts with other open PRs targeting develop

@trunk-io

trunk-io Bot commented Jul 11, 2026

Copy link
Copy Markdown

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

Expose MetricCardinalityLimit in core.toml (default 100,000) and pass it
through newBeholderClient and LoopRegistry env config to match common #2225.
@pkcll pkcll force-pushed the beholder-otel-limit-metric-cardinality branch from af4fd5e to a43c1b3 Compare July 13, 2026 17:46
Use new() for int pointers and add t.Parallel() to the test and subtests.

Co-authored-by: Cursor <cursoragent@cursor.com>
@pkcll pkcll force-pushed the beholder-otel-limit-metric-cardinality branch from 331b2f2 to 724abfc Compare July 13, 2026 18:00
…nalityLimit.

Regenerate CONFIG.md, update web resolver and node-validate txtar fixtures,
fix core.toml indentation and modernize lint, and tidy submodule go.mod files.

Co-authored-by: Cursor <cursoragent@cursor.com>
@pkcll pkcll force-pushed the beholder-otel-limit-metric-cardinality branch from 107f0e8 to 3bbc6a1 Compare July 13, 2026 18:39
@pkcll pkcll marked this pull request as ready for review July 13, 2026 18:59
@pkcll pkcll requested review from a team as code owners July 13, 2026 18:59
Comment on lines +187 to +190
if b.s.MetricCardinalityLimit == nil {
return defaultMetricCardinalityLimit
}
return *b.s.MetricCardinalityLimit

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't have hidden defaults buried in the logic of these method. I'm not sure when that started but it would be better not to perpetuate it.

Suggested change
if b.s.MetricCardinalityLimit == nil {
return defaultMetricCardinalityLimit
}
return *b.s.MetricCardinalityLimit
return *b.s.MetricCardinalityLimit

pkcll and others added 2 commits July 13, 2026 15:20
Default comes from core.toml via CoreDefaults(); avoid duplicating it in the accessor per review feedback.

Co-authored-by: Cursor <cursoragent@cursor.com>
Use v0.11.2-0.20260713191744-8fc8c4e5fe40 (8fc8c4e5) for metric cardinality limit changes.

Co-authored-by: Cursor <cursoragent@cursor.com>
@cl-sonarqube-production

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants